gsk: Increase blur node bounds by blur radius
authorTimm Bäder <mail@baedert.org>
Tue, 27 Feb 2018 13:12:25 +0000 (14:12 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 27 Feb 2018 13:12:25 +0000 (14:12 +0100)
Otherwise, the resulting node will be too small and the result looks
clipped.

gsk/gskrendernodeimpl.c

index 91678994f16612253aa75c57b5fdbbf37d705101..77c53e264fa3c44e75d0a7f6b0e0cface9ee5887 100644 (file)
@@ -4336,6 +4336,7 @@ gsk_blur_node_new (GskRenderNode *child,
                    double         radius)
 {
   GskBlurNode *self;
+  float clip_radius = gsk_cairo_blur_compute_pixels (radius);
 
   g_return_val_if_fail (GSK_IS_RENDER_NODE (child), NULL);
 
@@ -4345,6 +4346,8 @@ gsk_blur_node_new (GskRenderNode *child,
   self->radius = radius;
 
   graphene_rect_init_from_rect (&self->render_node.bounds, &child->bounds);
+  graphene_rect_inset (&self->render_node.bounds,
+                       - clip_radius, - clip_radius);
 
   return &self->render_node;
 }